package utils;

import java.io.File;
import java.util.Objects;

public class FileUtils {

    /**
     * Get File in classpath
     *
     * @param filename file name
     * @return File instance
     */
    public static File getClasspathFile(String filename) {
        return new File(Objects.requireNonNull(FileUtils.class.getClassLoader()
                .getResource(filename)).getPath());
    }

}
